#ifndef _CLASS_CGAME
#define _CLASS_CGAME

#include <iostream>
#include <vector>
#include <iterator>
#include "EndGameConditions.h"
#include "Player.h"
#include "Board.h"
#include "vector2.h"


//Struct SGameSettings
typedef struct sGameSettings
{
    MAP_SIZE           m_BoardSize;
    GAME_RENDERER_TYPE m_GameRendererType;
    unsigned int       m_NumberOfPlayers;
	unsigned int	   m_TokensToJoin;
	
} GAME_SETTINGS;


//Enum GameStates
typedef enum eGameStates{
    MENU,
    INIT,
    PAINT,
    CHOOSE_X_Y,
	CHECK,
    CHANGE_TURN,
    UPDATE,
	END,
    EXIT
} GAME_STATES;       
  

//Class CGame  
class CGame
{
    public:
		CGame();
        ~CGame();
        
        bool			UpdateGameState();
		GAME_SETTINGS   GetGameSettings();
        
    private:
        GAME_STATES									m_eState;
		CBoard *									m_board;
        
        std::vector<CPlayer *>						m_players;
		std::vector<CEndGameConditions *>			m_checks;
		bool										m_bExit;
        
        void Menu();
        void Init();
        void Paint();
        void Choose_X_Y();
        void Check();
        void Change_Turn();
        void Update();
		void End();
        void Exit();
			
};


#endif